﻿CREATE TABLE [dbo].[PersonPersonTyp]
(
	[Id] UNIQUEIDENTIFIER NOT NULL , 
    [ValId] UNIQUEIDENTIFIER NOT NULL, 
    [PersonId] UNIQUEIDENTIFIER NOT NULL, 
    [PersonTypId] UNIQUEIDENTIFIER NOT NULL, 
    CONSTRAINT [PK_PersonPersonTyp] PRIMARY KEY CLUSTERED ([Id] ASC, [ValId] ASC), 
    CONSTRAINT [FK_PersonPersonTyp_Person] FOREIGN KEY ([PersonId],[ValId]) REFERENCES [Person]([Id], [ValId]),
	CONSTRAINT [FK_PersonPersonTyp_PersonTyp] FOREIGN KEY ([PersonTypId],[ValId]) REFERENCES [PersonTyp]([Id], [ValId])
)
